<!DOCTYPE html>
<html class="no-js" lang="">

<head>
    #include( "/public-head.html")
</head>

<body style="background-color: #ffffff !important;">
<!-- main area -->
<div class="main-content checkbo">
    <div class="panel mb25">
        <div class="panel-heading border">
            #if($!{article.id}) 修改#else 添加#end视频手机详情页
        </div>
        <div class="panel-body">
            <div class="row no-margin">
                <div class="col-lg-12">
                    <form action="/admin/article/edit.do" id="articleForm" method="post" name="ajaxForm" class="form-horizontal bordered-group " role="form">
                        <input name="terminal" value="3" class="hidden" />
                        <input name="data" value="$!{article.data}" class="hidden" />
                        <div class="form-group">
                            <label class="col-sm-2 control-label">id</label>
                            <div class="col-sm-10">
                                <input type="text" name="id"  value="$!{article.id}" class="hidden" >
                                <input type="text"  class="form-control w250" value="$!{article.id}" placeholder="id" disabled="">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">所属专辑<code>*</code></label>
                            <div class="col-sm-10">
                                <select id="albumSelect" required data-placeholder="请选择频道" class="chosen w150" name="albumId">
                                    <option value=""></option>
                                    #if($albums)
                                    #foreach( $row in $!{albums})
                                    <option value="$!{row.id}">$!{row.name}</option>
                                    #end
                                    #end
                                </select>
                            </div>
                        </div>
                        <script>
                            initEditSelect('albumSelect','$!{article.albumId}');
                        </script>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">标题</label>
                            <div class="col-sm-10">
                                <input type="text" required name="title" data-theme="data" value="$!{article.title}" class="form-control w250" placeholder="标题">
                            </div>
                        </div>


                        <div class="form-group">
                            <label class="col-sm-2 control-label">是否上线</label>
                            <div id="isDisplay" class="col-sm-10" data-theme-name="video-type-div">
                                <label class="cb-radio">
                                    <input type="radio" required name="isDisplay" data-theme="data" value="1" />是
                                </label>
                                <label class="cb-radio">
                                    <input type="radio" required name="isDisplay" data-theme="data" value="0" />否
                                </label>
                            </div>
                        </div>
                        <script>
                            initEditRadio('isDisplay','$!{article.isDisplay}');
                        </script>

                        <textarea id="content" name="content" class="hidden"></textarea>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">内容</label>
                            <div  class="col-sm-10">
                                <div class="summernote w500" id="contentSummernote" data-theme-name="articleHtml">$!{content}</div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">标签<code>*</code></label>
                            <div class="col-sm-10">
                                <input id="tags" type="text" required name="tags" data-decimals="每输入一个标签回车结束" value="$!{article.tags}" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">备注</label>
                            <div class="col-sm-10">
                                <textarea class="form-control" id="description"  name="description" rows="3">$!{article.description}</textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label></label>
                            <div>
                                <button type="submit" class="btn btn-primary mr10">#if($!{article.id}) 修改#else 添加#end</button>
                                <button type="button" class="btn btn-primary mr10 article-preview" data-toggle="modal" data-target=".video-article-preview">预览</button>
                                <button class="btn btn-default">返回</button>
                            </div>
                        </div>

                    </form>
                </div>
            </div>
        </div>
    </div>


</div>
<!-- /main area -->
#include( "/public-script.html")
#include( "/sub-script.html")
<script>


    $(function(){
//        $('#contentSummernote').next().find('.note-editable').html("$!{content}");
    });


</script>
</body>

</html>
